<template>
  <div>
    <el-container style="height:700px; border: 1px solid #eee">
      <el-header style="font-size: 40px; background-color: white;">威海环海自驾汽车租凭管理系统</el-header>
      <el-container>
        <el-aside width="230px" style="border: 1px solid #eee">
          <el-menu :default-openeds="['1', '3']">

            <el-submenu index="1">
              <template slot="title"><i class="el-icon-message"></i>客户信息</template>
              <el-menu-item-group>
                <el-menu-item index="1-1">
                  <router-link :to="{ path: '/client/clientPersonal', query: { userAcct: $route.query.userAcct } }">个人信息</router-link>
                </el-menu-item>
                <el-menu-item index="1-2">
                  <router-link :to="{ path: '/client/clientAcct', query: { userAcct: $route.query.userAcct } }">客户账户</router-link>
                </el-menu-item>
                <el-menu-item index="1-3">
                  <router-link :to="{ path: '/client/leaseInfo', query: { userAcct: $route.query.userAcct } }">租凭登记信息</router-link>
                </el-menu-item>
                <el-menu-item index="1-4">
                  <router-link :to="{ path: '/client/returnInfo', query: { userAcct: $route.query.userAcct } }">租凭归还信息</router-link>
                </el-menu-item>
                <el-menu-item index="1-5">
                  <router-link :to="{ path: '/client/rechargeInfo', query: { userAcct: $route.query.userAcct } }">充值信息</router-link>
                </el-menu-item>
                <el-menu-item index="1-6">
                  <router-link :to="{ path: '/client/deductInfo', query: { userAcct: $route.query.userAcct } }">扣款信息</router-link>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>

            <el-submenu index="2">
              <template slot="title"><i class="el-icon-s-goods"></i>交易模块</template>
              <el-menu-item-group>
                <el-menu-item index="2-1">
                  <router-link :to="{ path: '/client/carlease', query: { userAcct: $route.query.userAcct } }">汽车租凭</router-link>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>

          </el-menu>
        </el-aside>

        <el-main>
          <!-- 表格 -->
          <el-table :data="tableData" border>
            <el-table-column prop="checkID" label="租凭单号" width="auto"></el-table-column>
            <el-table-column prop="clientID" label="客户编号" width="auto"></el-table-column>
            <el-table-column prop="clientName" label="客户姓名" width="auto"></el-table-column>
            <el-table-column prop="demoney" label="扣款金额" width="80px"></el-table-column>
            <el-table-column prop="detime" label="扣款时间" width="110px"></el-table-column>
          </el-table>

          <br><br>

        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import axios from 'axios';

export default {
  data() {
    return {
      tableData: [],
    }
  },
  mounted() {
    //发送异步请求，获取数据
    axios.get("http://localhost:8081/deductInfo/select1?clientID=" + this.$route.query.userAcct).then((result) => {
      this.tableData=result.data.data;
    });
  },

}
</script>

<style>

</style>